package cn.getech.data.development.mapper;

import cn.getech.data.development.dto.IdAndNameDto;
import cn.getech.data.development.entity.BdpRealTaskAlarm;
import cn.getech.data.development.model.dto.RealTaskAlarmInfoDto;
import cn.getech.data.development.model.vo.RealTaskAlarmSearchVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 实时任务告警表 Mapper 接口
 * </p>
 *
 * @author hujz
 * @since 2021-04-08
 */
@Mapper
public interface BdpRealTaskAlarmMapper extends BaseMapper<BdpRealTaskAlarm> {

    IPage<BdpRealTaskAlarm> alarmPage(Page<BdpRealTaskAlarm> page, @Param("realTaskAlarmSearchVO") RealTaskAlarmSearchVO realTaskAlarmSearchVO);

    void updateStatusById(@Param("id")Integer id, @Param("state")Integer state);

    void updateNoDisturbingNull(@Param("id")Integer id);

    List<RealTaskAlarmInfoDto> listByTaskMenuId(@Param("taskMenuId") Integer taskMenuId);

    List<IdAndNameDto> getRecriverList(@Param("tenantId")Integer tenantId);

    List<IdAndNameDto> getCreaterList(@Param("tenantId")Integer tenantId);
}
